package com.qfedu.luck.vo;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @program: LuckStudy
 * @description:
 * @author: Feri(邢朋辉)
 * @create: 2021-02-24 14:42
 */
@Data
@NoArgsConstructor
public class R {
    private int code;
    private String msg;
    private Object data;

    public static R ok(Object data){
        R r=new R();
        r.setCode(100);
        r.setMsg("OK");
        r.setData(data);
        return r;
    }
    public static R fail(){
        R r=new R();
        r.setCode(101);
        r.setMsg("Fail");
        r.setData(null);
        return r;
    }
}